import asyncio

import file_download
import parsing


async def main() -> None:
    """ Точка входа """

    parser_object = parsing.Parser()
    file_download_object = file_download.FileDownload()
    task_list_of_downloading_files = []

    file_tree = parser_object.parse_file_tree()
    file_download_object.create_directories_for_file_tree(file_tree)

    await file_download_object.get_list_of_tasks_for_downloading_files(
        file_tree,
        task_list_of_downloading_files
    )

    _ = [await task for task in task_list_of_downloading_files]
        
    file_download_object.show_sha256_hash_files()


if __name__ == '__main__':
    asyncio.run(main())
